package com.byxy.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import com.byxy.entity.Order;
import com.byxy.service.OrderService;
import com.opensymphony.xwork2.ActionSupport;

public class ListAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6523796976083504478L;

	Map<String, Object> data = new HashMap<String, Object>();

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}

	@Resource
	private OrderService orderService;

	public String list() {
		List<Order> list = orderService.find();
		data.put("list", list);
		return SUCCESS;
	}
}
